﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第124题
//BC126 小乐乐算多少人被请家长
//https://www.nowcoder.com/practice/1654083e09d2432aa24b151d36309155?tpId=107&tqId=33407&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D3%26tpId%3D107%26type%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int n = 0;
    scanf("%d", &n);
    int count = 0;//计算被叫家长的人数
    for (int i = 0; i < n; i++) {
        int Math = 0, Chinese = 0, English = 0;
        scanf("%d %d %d", &Math, &Chinese, &English);
        int aver = (Math + Chinese + English) / 3;//计算平均分
        if (aver < 60) {
            count++;
        }
    }

    printf("%d\n", count);

    return 0;
}